package heliotrope.net.loader
{
	import heliotrope.global.ErrorHandler;
	public class TextTarget implements ILoadTarget
	{
		private var _data:String;
		public function TextTarget()
		{
		}
		
		public function saveData(data_:Object):void
		{
			CONFIG::debug
			{
				try
				{
					if(!(data_ is String)) throw new ArgumentError("Wrong data type to save");
					_data = data_ as String;
				} 
				catch(error:ArgumentError) 
				{
					ErrorHandler.handle(error);
				}
			}
			
		}
		
		public function get text():String
		{
			return _data;
		}
	}
}